﻿using MCUPackage.DesignEditor;
using Newtonsoft.Json;
using System;
using System.ComponentModel;

namespace SxPackages.STC8.Models
{
	[Serializable]
	class AllIICOptions
	{
		/// <summary>
		/// 所有IIC配置集合
		/// </summary>
		[Browsable(false),
		JsonIgnore]
		public IICOptions[] All { get; private set; }

		[Category("I2C配置"),
		DisplayName("通用I2C"),
		TypeConverter(typeof(PropertySorter))]
		public IICOptions IIC { get; private set; }

		[Category("I2C配置"),
		DisplayName("模拟I2C"),
		TypeConverter(typeof(PropertySorter))]
		public SoftIICOptions Soft { get; private set; }

		public AllIICOptions(STC8HUSOP20 aParent)
		{
			this.IIC = new IICOptions(aParent);
			this.Soft = new SoftIICOptions(aParent);
			this.All = new IICOptions[] { this.IIC, this.Soft };
		}
	}
}
